﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Tizer.Web
{
    /// <summary>
    /// Расширения
    /// </summary>
    public static class Extension
    {
        public static String ConvertToString(this Enum e)
        {
            return Enum.GetName(e.GetType(), e);
        }

        public static TEnumType ConverToEnum<TEnumType>(this String enumValue)
        {
            return (TEnumType) Enum.Parse(typeof (TEnumType), enumValue);
        }
    }
}